<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Electronix Store</title>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
        <link rel="stylesheet" type="text/css" href="style.css" />
        <link rel="stylesheet" type="text/css" href="css/Style2.css" />
        <script type="text/javascript" src="js/boxOver.js"></script>
        <script type="text/javascript" src="js/checkCategory.js"></script>
        <script type="text/javascript" src="js/windowopen.js"></script>
        <script type="text/javascript" src="js/gen_validatorv4.js"></script> 
        <script type="text/javascript">
            function addCart(id) {
                // alert(id);
                var xmlhttp;
                if (window.XMLHttpRequest)
                {// code for IE7+, Firefox, Chrome, Opera, Safari
                    xmlhttp = new XMLHttpRequest();
                }
                else
                {// code for IE6, IE5
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.onreadystatechange = function()
                {

                    //  alert(xmlhttp.responseText);
                    if (xmlhttp.readyState === 4 && xmlhttp.status === 200)
                    {
                        alert(xmlhttp.responseText);
                        document.getElementById("output").innerHTML = xmlhttp.responseText;
                        window.location = "signinpage.jsp"
                    }
                };
                xmlhttp.open("GET", "UserCart?id=" + id, true);
                xmlhttp.send();
            }

            function validateCategory() {

                var xmlhttp = new XMLHttpRequest();
                category = document.getElementById("cat").value;
                if (category == null || category == "")
                {
                    alert("Category must be filled out");
                    return false;
                }
                // keyword=document.search.data.value;
                xmlhttp.open("POST", "categoryChecker", true);
                data = "category=" + category;
                xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                xmlhttp.send(data);
                xmlhttp.onreadystatechange = function()
                {
                    if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
                    {
                        if (xmlhttp.responseText == "Category is Available")
                        {
                            document.getElementById("caterror").innerHTML = xmlhttp.responseText;
                        }

                        else if (xmlhttp.responseText == "Done")
                        {
                            window.location = "AdminMainCategory";
                        }

                    }
                };
            }
            function deleteAlert()
            {
                alert("You will delete all Products of this Category");
            }

        </script>
    </head>
    <body>
        <div id="output"></div>
        <div id="main_container">
            <div class="top_bar">
                <div class="top_search">
                    <div class="search_text"><a href="http://all-free-download.com/free-website-templates/">Advanced Search</a></div>
                    <input type="text" class="search_input" name="search" />
                    <input type="image" src="images/search.gif" class="search_bt"/>
                </div>
                <div class="languages">
                    <div class="lang_text">Languages:</div>
                    <a href="http://all-free-download.com/free-website-templates/" class="lang"><img src="images/en.gif" alt="" border="0" /></a> <a href="http://all-free-download.com/free-website-templates/" class="lang"><img src="images/de.gif" alt="" border="0" /></a> </div>
            </div>
            <div id="header">
                <div id="logo"> <a href="http://all-free-download.com/free-website-templates/"><img src="images/logo.png" alt="" border="0" width="237" height="140" /></a> </div>
                <div class="oferte_content">
                    <div class="top_divider"><img src="images/header_divider.png" alt="" width="1" height="164" /></div>
                    <div class="oferta">
                        <div class="oferta_content"> <img src="images/laptop.png" width="94" height="92" alt="" border="0" class="oferta_img" />
                            <div class="oferta_details">
                                <div class="oferta_title">Samsung GX 2004 LM</div>
                                <div class="oferta_text"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco </div>
                                <a href="details.html" class="details">details</a> </div>
                        </div>
                        <div class="oferta_pagination"> <span class="current">1</span> <a href="http://all-free-download.com/free-website-templates/">2</a> <a href="http://all-free-download.com/free-website-templates/">3</a> <a href="http://all-free-download.com/free-website-templates/">4</a> <a href="http://all-free-download.com/free-website-templates/">5</a> </div>
                    </div>
                    <div class="top_divider"><img src="images/header_divider.png" alt="" width="1" height="164" /></div>
                </div>
                <!-- end of oferte_content-->

            </div>